package com.ys.service.wallet.eth;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.web3j.protocol.Web3j;
import org.web3j.protocol.http.HttpService;

/**
 *
 */
@Component
@ConfigurationProperties("wallet.eth")
@Data
@Slf4j
public class Web3jClient {

    public String server;
    @Bean
    public Web3j init(){
        Web3j web3 = Web3j.build(new HttpService(server));
        return web3;
    }


}
